package club.banyuan.demo.sec.service;

import org.springframework.security.authentication.AnonymousAuthenticationToken;
import org.springframework.security.core.Authentication;
import org.springframework.stereotype.Component;

import javax.servlet.http.HttpServletRequest;

@Component("permissionService")
public class PermissionService {

    public boolean hasPermission(HttpServletRequest request, Authentication authentication) {
        // 加载用户权限
        if (authentication instanceof AnonymousAuthenticationToken) {
            return false;
        }

        // TODO 其他判断逻辑

        return false;
    }
}
